'''
Author: thinktanker thinktanker@163.com
Date: 2024-05-21 15:13:13
LastEditors: thinktanker thinktanker@163.com
LastEditTime: 2024-05-22 10:28:49
FilePath: \equipment\equip.py
Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
'''
with open('./test.txt', 'r', encoding='utf8') as f:
    all_lines = f.readlines()
# print(all_content)
equip_list = []
for line in all_lines:
    if ('责任人姓名' in line):
        line_len = len(line.strip().split('\t'))
        if line_len > 1:
            equip_list.append(line.strip().split('\t')[1])
        else:
            equip_list.append('-----')

print(equip_list)
print(len(equip_list))

with open('./equip5.txt', 'w', encoding='utf8') as f:
    for equip in equip_list:
        f.write(equip + '\n')
